package com.bdjk.bdmw.InfoGath.communication.protocol.beianbei;

import com.bdjk.bdmw.InfoGath.business.beianbei.vo.BeiAnBeiShortVO;
import com.bdjk.bdmw.InfoGath.communication.protocol.BaseProtocol;
import java.io.PrintStream;

public class BeiAnBeiRespondProtocol
  extends BaseProtocol<BeiAnBeiShortVO>
{
  public BeiAnBeiRespondProtocol()
  {
    this.isResponse = false;
    this.isSave = true;
  }
  
  public String encodeMessage(BeiAnBeiShortVO vo)
  {
    return null;
  }
  
  public BeiAnBeiShortVO decodeMessage(String message)
  {
    BeiAnBeiShortVO vo = new BeiAnBeiShortVO();
    String[] terparams = message.split("\\*");
    System.out.println(terparams.length);
    vo.setCommType(terparams[0]);
    vo.setTerIdent(terparams[1]);
    vo.setMsgLength(terparams[2]);
    vo.setProCode(terparams[3]);
    this.terIdent = vo.getTerIdent();
    return vo;
  }
}
